const Ajax=(url:string,callback:any,type:string='get')=>{
     const xhr=new XMLHttpRequest()

     xhr.open(url,type,true)

     xhr.send()
     xhr.onreadystatechange=()=>{
        if(xhr.status===200&&xhr.readyState===4){
           callback(JSON.parse(xhr.response))
       }
     }
    
}